import os
import json


def gen_tag_text(json_path, text_path):
    names = []
    with open(json_path, 'r') as f:
        data = json.loads(f.read())
    for index, name in data.items():
        names.append(name)
    with open(text_path, 'w') as f:
        for name in names:
            f.write('{}\n'.format(name))


if __name__ == '__main__':
    json_path = '../data/index2actress.json'
    text_path = '../crawler/google/keywords.txt'
    gen_tag_text(json_path, text_path)
